import  urllib.request
# from urllib import request
url='http://www.jd.com'
headers={
    'user_Agent':'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36'
}
r=urllib.request.urlopen(url)
request=urllib.request.Request(url=url,headers=headers)
r=urllib.request.urlopen(request)
html=r.read().decode('utf-8')
print(html)


# print(type(r))
# print(r)
# print(r.read())
# html=r.read().decode('utf-8')
# print(html)
# print(r.geturl())
# print(r.getcode())
# print(r.info())

